package com.aplink.generic.constant;


public enum ControlType {

    ActionBarMenu( "actionbar_menu" ),
    Gallery( "gallery" ),
    GridView( "gridview" ),
    Button( "submit", "changePassword" ),
    CheckBox( "checkbox" ),
    ContextMenu( "context_menu" ),
    DatePicker( "datepicker" ),
    EditText( "textbox" ),
    FrameLayout( "customFragment" ),
    ImageView( "image" ),
    ListView( "listview", "menulistview" ),
    Spinner( "ddl" ),
    TextView( "label" ),
    ViewPager( "viewpager" ),
    FragmentTabHost( "tabhost" );

    private String[] values;

    public static ControlType get( String value ) {
        for ( ControlType controlType : values() ) {
            for ( String v : controlType.getValues() ) {
                if ( v.equalsIgnoreCase( value ) ) {
                    return controlType;
                }
            }
        }
        return null;
    }

    private ControlType( String... values ) {
        this.values = values;
    }

    public String[] getValues() {
        return this.values;
    }
}
